﻿Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Linq
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Xml.Linq
Imports BBDD
Imports Controladores

 _

Class usuariosPendientes
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        If Session("privUser") Is Nothing Or Integer.Parse(Session("privUser").ToString()) < 2 Then
            Response.Redirect("index.aspx")
        End If
        listaUserPend.Value = Consultas.listarUsuarios(1)
    End Sub 'Page_Load


    Protected Sub boton_validUser_Click(ByVal sender As Object, ByVal e As EventArgs)
        If Consultas.existeUsuario(campoDNIValidacion.Text.ToString()) Then
            Consultas.setesPendiente(campoDNIValidacion.Text.ToString(), 0)
            Response.Redirect("admin.aspx")
        End If

        controlador.CreateMessageAlert(Me, "No existe tal usuario con el DNI proporcionado", "Mensaje de error")
    End Sub 'boton_validUser_Click
End Class 'usuariosPendientes